The authors propose a neural model based on word embedding with entry embedding and attention mechanism, which can make full use of the unstructured text in the electronic medical record to achieve automated ICD coding for the main diagnosis of the medical record home page. This method first embeds the words which contain the medical record entries into word embeddings, and enriches word-level representation based on keyword attention. Then, the word attention is used to highlight the role of key words and enhance the text representation. Finally, ICD codes are output by a fully connected neural network classifier. Ablation study on a Chinese electronic medical record data set shows that word embedding with entry embedding, keyword attention and word attention is effective. The proposed model gets the best results for 81 diseases classification compared with baselines and can effectively improve the quality of automated ICD coding.